package com.ce.tag;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.ce.framework.util.DateUtil;
import com.ce.framework.util.StringUtil;
import com.ce.util.TreeNode;

public class MonthSelectTag extends AbstractSelectTag {
	private static final long serialVersionUID = 1L;
	
	List<TreeNode> getContentList() {
		if(StringUtil.isBlank(value)){
			value = DateUtil.format(new Date(),"MM");
		}
		if(value.length()==1)value="0"+value;
		List<TreeNode> res = new ArrayList<TreeNode>();
		for(int i=1;i<=12;i++){
			res.add(new TreeNode(""+(i<10?"0"+i:""+i),""+i));
		}
		return res;
	}

}
